<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021-05-15
  Time: 10:08
  To change this template use File | Settings | File Templates.
--%>

<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<html>
<head>
    <title>用户列表信息页面</title>
    <c:import url="hcommon.jsp"></c:import>
    <c:import url="header.jsp"></c:import>
    <c:import url="left.jsp"></c:import>
    <script>
        function choose(obj) {
            console.log(obj)
            if (obj.checked == true) {
                $("[name='ids']").prop("checked", true);
            } else {
                $("[name='ids']").prop("checked", false);
            }
        }
    </script>
</head>
<body>
<div style="margin-top:68px ;margin-left: 240px">
    <form action="" method="post">
        <table class="table table-hover">
            <tr>
                <th><input type="checkbox" value="全选/全部选" onclick="choose(this)"/></th>
                <th>用户编号</th>
                <th>用户姓名</th>
                <th>用户密码</th>
                <th>用户电话</th>
                <th>用户昵称</th>
                <th>用户性别</th>
                <th>用户年龄</th>
                <th>用户地址</th>
                <th>用户头像</th>
                <th>用户红包</th>
            </tr>
            <c:forEach var="user" items="${list}">
                <tr>
                    <td><input name="ids" type="checkbox" value="${user.uid}" /></td>
                    <td>${user.uid}</td>
                    <td><a href="findbyid?uid=${user.uid}">${user.uname}</a></td>
                    <td>${user.upass}</td>
                    <td>${user.utel}</td>
                    <td>${user.unickname}</td>
                    <td>${user.usex}</td>
                    <td>${user.uage}</td>
                    <td>${user.uaddress}</td>
                    <td>${user.uphoto}</td>
                    <td>${user.uredpacket}</td>
                    <td><input onclick="javascript:location.href='toinfo.action?uid=${user.uid}'"
                               value="修改" type="button" /></td>
                </tr>
            </c:forEach>
            <tr align="center">
                <td colspan="10"><input
                        onclick="javascript:location.href='.action'" value="添加"
                        type="button" /> <input value="删除" type="submit" /></td>
            </tr>
        </table>
    </form>
</div>
</body>
</html>

